﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace SimpleBomberman
{
    public abstract class GameObject : IDraw
    {
        #region Private Members

        private int _x;
        private int _y;

        private int _length;

        #endregion Private Members

        #region Properties

        public int X
        {
            get
            {
                return this._x;
            }
            set
            {
                if (value >= 0)
                {
                    this._x = value;
                }
            }
        }
        public int Y
        {
            get
            {
                return this._y;
            }
            set
            {
                if (value >= 0)
                {
                    this._y = value;
                }
            }
        }
        public int Length
        {
            get
            {
                return this._length;
            }
            set
            {
                if (value >= 0)
                {
                    this._length = value;
                }
            }
        }

        #endregion Properties

        #region Constructors

        public GameObject()
        {
            this._x = 0;
            this._y = 0;
            this._length = 30;
        }
        public GameObject(int x, int y, int length)
        {
            this._x = x;
            this._y = y;
            this._length = length;
        }

        #endregion Constructors

        #region Public Methods

        public abstract void Draw(Graphics g);

        #endregion Public methods
    }
}
